﻿using UnityEngine;
using System.Collections;

public class Popup_SpendKina : Popup_Base
{
    public UILabel m_Body;

    public UILabel m_Kina;

    public void SetPopupWithMaterialName(string name)
    {
        //m_Body.text = string.Format("{0} 길드원을 소모하여\n강화하시겠습니까?", name);

        m_Body.text = string.Format(TextController.GetStringWithId("uiPopupCharUpgradeCaution3") , name);
        m_Kina.text = string.Format("-{0}", Constants.EnhanceKina);
    }

    public override void ButtonTouch(Collider collider)
    {
        switch (collider.gameObject.name)
        {
            case "Button_OK":
                BackButton();

                if (m_MessageRecieaver_OK != null && m_Message_OK != null)
                    m_MessageRecieaver_OK.SendMessage(m_Message_OK);
                break;
            case "Button_Back":
                BackButton();
                break;
        }
    }

    public override void BackButton()
    {
        PopupManager.PopPopup();

        if (m_MessageRecieaver_NO != null && m_Message_NO != null)
            m_MessageRecieaver_NO.SendMessage(m_Message_NO);
    }
}